package com.xuelang.pipeline.artifact.client.common.constant;

import java.util.Map;

/**
 * 常量类
 *
 * @author xiwen.zxg
 * @since 2024/5/17
 */
public interface Constant {

    /**
     * 请求头名称：Authorization
     */
    String REQUEST_HEADER_NAME_Authorization = "Authorization";
    String REQUEST_HEADER_NAME_authorization = "authorization";
    /**
     * 请求头名称：Content-Type
     */
    String REQUEST_HEADER_PREFIX_ContentType = "Content-Type";
    String REQUEST_HEADER_PREFIX_contenttype = "content-type";
    String REQUEST_HEADER_PREFIX_Authorization = "Basic ";    /**
     * 默认项目编码
     */
    String DEFAULT_PROJECT_CODE = "SYSTEM";
    /**
     * 默认项目名称
     */
    String DEFAULT_PROJECT_NAME = "系统内建项目";
    /**
     * 默认流水线名称前缀
     */
    String DEFAULT_NEW_PIPELINE_NAME_PREFIX = "新建流水线";
    /**
     * 生成全局唯一标签的长度
     */
    Integer UNIQUE_LABEL_LENGTH = 5;
    /**
     * 车牌号取值范围
     */
    String PLATE_NUMBER_CHARACTER = "abcdefghijklmnopqrstuvwxyz1234567890";
    /**
     * 车牌号取值范围长度
     */
    Integer PLATE_NUMBER_CHARACTER_LENGTH = 36;
    /**
     * 流水线组件标签key前缀
     */
    String COMPONENT_LABEL_KEY_PREFIX = "app=";
    /**
     * 默认数据分隔符
     */
    String DEFAULT_DATA_SEPARATOR = ",";
    /**
     * 中划线分隔符
     */
    String DEFAULT_MIDDLE_SEPARATOR = "-";
    /**
     * Url路径分隔符
     */
    String DEFAULT_URL_PATH_SEPARATOR = "/";
    /**
     * 默认日期格式
     */
    String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    /**
     * 数据库不存在数据默认取值
     */
    String DEFAULT_DB_NOT_EXISTS_DATA  = "-111111";
    /**
     * 任务类型定义信息map
     */
    Map<String, String> TASK_TYPE_INFO_MAP = new java.util.HashMap<String, String>() {
        {
            put("pull_code", "拉取代码");
            put("build_code", "代码构建");
            put("build_image", "镜像构建");
            put("scan_code", "代码扫描");
            put("deploy_code", "部署");
        }
    };


    /**
     * hiforce#userId
     */
    String HIFORCE_USER_ID = "userId";
    /**
     *  hiforce#account
     */
    String HIFORCE_USER_ACCOUNT = "account";

}
